﻿using Abp.Application.Services.Dto;
using Abp.AutoMapper;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace Sunlit.House.Regions.Dto
{
    [AutoMap(typeof(Region))]
    public class RegionDto : EntityDto
    {
        /// <summary>
        /// 名称
        /// </summary>
        [Required]
        [StringLength(Region.MaxNameLength, ErrorMessage = "最大长度不得超过{1}个字符")]
        public string Name { get; set; }
        /// <summary>
        /// 简拼
        /// </summary>
        [StringLength(Region.MaxSpellLength, ErrorMessage = "最大长度不得超过{1}个字符")]
        public string Spell { get; set; }
        /// <summary>
        /// 简短拼写
        /// </summary>
        [StringLength(Region.MaxShortSpellLength, ErrorMessage = "最大长度不得超过{1}个字符")]
        public string ShortSpell { get; set; }
        /// <summary>
        /// 显示顺序
        /// </summary>
        public int DisplayOrder { get; set; }
        /// <summary>
        /// 父Id
        /// </summary>
        public int? ParentId { get; set; }
        /// <summary>
        /// 层级
        /// </summary>
        public int Layer { get; set; }
        /// <summary>
        /// 热门地区
        /// </summary>
        public bool IsHot { get; set; }
        /// <summary>
        /// 省ID
        /// </summary>
        public int ProvinceId { get; set; }
        /// <summary>
        /// 省名称
        /// </summary>
        [StringLength(Region.MaxNameLength, ErrorMessage = "最大长度不得超过{1}个字符")]
        public string ProvinceName { get; set; }
        /// <summary>
        /// 城市ID
        /// </summary>
        public int CityId { get; set; }
        /// <summary>
        /// 城市名称
        /// </summary>
        [StringLength(Region.MaxNameLength, ErrorMessage = "最大长度不得超过{1}个字符")]
        public string CityName { get; set; }
        [StringLength(256)]
        public string FullName { get; set; }

        public List<RegionDto> Children { get; set; }

    }
}
